package com.project.role;

import com.project.frame.GameStartFrame;
import com.project.util.ImageChange;

import java.awt.*;
import java.util.List;

public class DogMachine extends BaseRole {
    /**
     * 机器狗图片数组
     */
    public static Image[] dogMachineImg;
    /**
     * 图片切换算法对象
     */
    private ImageChange imageChange = new ImageChange(5);

    public DogMachine() {
        super(500, 300, 100, 100);
    }

    @Override
    public void move() {
        this.img = imageChange.change(dogMachineImg);
    }


    @Override
    public void collision() {
//        List<BaseRole> roleList = GameStartFrame.roleList;
//        for (int i = 0; i < roleList.size(); i++) {
//            BaseRole role = roleList.get(i);
//            if (role instanceof GirlBullet) {
//                if (role.rect.intersects(this.rect)) {
//                    role.hp = -1;
//                    this.hp-=width/10;
//                }
//            }
//        }
    }
}
